﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ICloneable.cs" company="XamlNinja">
//   2011 Richard Griffin and Ollie Riches
// </copyright>
// <summary>
//   Defines explicitly how a derived base model class will be cloned.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace WP7Contrib.Common
{
    /// <summary>
    /// Defines explicitly how a class will be cloned.
    /// </summary>
    /// <typeparam name="T">
    /// </typeparam>
    public interface ICloneable<T>
    {
        /// <summary>
        /// Performs a shallow copy of a class - shallow means value types are copied and the reference types
        /// are assigned.
        /// </summary>
        /// <returns>
        /// </returns>
        T ShallowClone();

        /// <summary>
        /// Performs a deep copy of a class - deep means both value & references types are copied.
        /// </summary>
        /// <returns>
        /// </returns>
        T DeepClone();
    }
}